home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / cuj0593.zip / 1105082B < prev    next >
Text File  |  1993-05-16  |  648b  |  36 lines

  1. // fv1.h - a dynamic vector of float (with a possibly
  2. // non-zero low-bound) using a subscripting object
  3. // implemented by inheritance from float_array
  4.  
  5. #include "fa1.h"
  6.  
  7. class float_vector : public float_array
  8.     {
  9. public:
  10.     float_vector(int lo = 0, int hi = 0);
  11.     float operator[](int i) const;
  12.     fa_index operator[](int i);
  13.     int low() const;
  14.     int high() const;
  15. private:
  16.     int _low;
  17.     };
  18.  
  19. inline float_vector::float_vector(int lo, int hi)
  20.     : _low(lo), float_array(hi - lo + 1)
  21.     { }
  22.  
  23. inline int float_vector::low() const
  24.     {
  25.     return _low;
  26.     }
  27.  
  28. inline int float_vector::high() const
  29.     {
  30.     return _low + length() - 1;
  31.     }
  32.  
  33.  
  34.  
  35.  
  36.